var oFooter = document.createElement("div");
oFooter.className = 'footerBox';
var footArr = new Array();
footArr.push('<a href="#" class="active">');
	footArr.push('<i class="icon-index"></i>');
	footArr.push('<span>首页</span>');
footArr.push('</a>');
footArr.push('<a href="#">');
	footArr.push('<i class="icon-offline"></i>');
	footArr.push('<span>线下服务</span>');
footArr.push('</a>');
footArr.push('<a href="#">');
	footArr.push('<i class="icon-collect"></i>');
	footArr.push('<span>收藏</span>');
footArr.push('</a>');
footArr.push('<a href="#">');
	footArr.push('<i class="icon-cart"></i>');
	footArr.push('<span>购物车</span>');
footArr.push('</a>');
footArr.push('<a href="#">');
	footArr.push('<i class="icon-decorate"></i>');
	footArr.push('<span>装饰</span>');
footArr.push('</a>');
footArr.push('<a href="#">');
	footArr.push('<i class="icon-user"></i>');
	footArr.push('<span>我的</span>');
footArr.push('</a>');
oFooter.innerHTML = footArr.join('');
document.body.appendChild(oFooter);

$('.footerBox').on('click','a',function(){
	$(this).addClass('active').siblings().removeClass('active');
	
});

//获取底部导航条的高度，赋值给div作为占位
var footHeight = $('.footerBox').height();
$('#footerHeight').height(footHeight);